/*
 * =====================================================================================
 *
 *       Filename:  LangDetector.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2015年04月01日 18时36分21秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  LiuYi (), swliuyi@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#ifndef LANGDETECTOR_H
#define LANGDETECTOR_H
#include <iostream>
#include <fstream>
#include <string>
#include <set>
#include "LM.h"
#include "Text.h"
#include "WordLM.h"
using namespace std;
class LangDetector
{
    private:
        string m_langName;
        string m_code;
        double m_charScore;
        double m_LMScore;
        set<string> m_CharSet;
        LM * m_pLM;
        bool LoadCharSet(string charSetPath);
    public:
        LangDetector(string langName, string code, string charSetPath, string LMPath, int maxGramNum);
        double ComputeCharScore(vector<string> sent);
        double ComputeLMScore(string sent, int gramNum);
        ~LangDetector();
};

#endif
